package com.cedifie.lendapp.mvp

import android.os.Bundle
import com.cedifie.lendapp.ui.launch.CedLaunchAct
import com.lib.base.base.BaseActivity
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.MainScope

/**
 * Cedifie
 * @Author wwdeng
 * @CreateTime: 2024/9/20 10:16
 * @Annotation：应用kill,重启处理
 */
abstract class RestartAct: BaseActivity(), CoroutineScope by MainScope() {
    //是否被系统回收
    var isRecreated = false

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (savedInstanceState != null){
            isRecreated = true
        }
        if (savedInstanceState != null && this::class.java.simpleName != CedLaunchAct::class.java.simpleName){
            onIntent(CedLaunchAct::class.java)
            return
        }
    }
}